FROM lscr.io/linuxserver/chromium:latest

LABEL MAINTAINER="shouyong <260240310@qq.com>"   

# 替换默认的apt源为清华大学镜像源
# RUN sed -i 's/http:\/\/deb.debian.org\/debian\//http:\/\/mirrors.tuna.tsinghua.edu.cn\/debian\//g' /etc/apt/sources.list
COPY ./sources.list /etc/apt/sources.list

# 安装中文包，支持中文
ENV DOCKER_MODS=linuxserver/mods:universal-package-install 
ENV INSTALL_PACKAGES="fonts-noto-cjk python3-pip python3.11-venv"
ENV LC_ALL=zh_CN.UTF-8

# RUN pip install DrissionPage -i https://pypi.tuna.tsinghua.edu.cn/simple

# 设置可调试
COPY ./wrapped-chromium /usr/bin/wrapped-chromium
RUN chmod +x /usr/bin/wrapped-chromium

# 开启远程调试
ENV REMOTE_DEBUGGING=true
# 无头模式
# ENV HEADLESS=true  
